package com.tongda.core.enums;

public enum SelfServiceMarkEnum {
	CLEANUP("-11", "已处理消息清理"), CALLORDER("0", "下单"), ADDTABLEWARE("1", "添加餐具"), CHECKOUT(
			"2", "结账"), CUSTOMER("3", "客户自定义"), URGEDISH("4", "催菜"), CALLSERVCIE(
			"5", "现场服务"), OTHER("6", "其他");
	public final static String enumCode = "SelfServiceMarkEnum";
	public final static String enumName = "自助服务的标示";

	private String code;
	private String desc;

	SelfServiceMarkEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}

	public static String getDesc(String code) {
		for (SelfServiceMarkEnum status : SelfServiceMarkEnum.values()) {
			if (status.getCode().equalsIgnoreCase(code)) {
				return status.getDesc();
			}
		}
		return "其他";
	}

	public static SelfServiceMarkEnum getEnumByCode(String code) {
		for (SelfServiceMarkEnum status : SelfServiceMarkEnum.values()) {
			if (status.getCode().equalsIgnoreCase(code)) {
				return status;
			}
		}
		return SelfServiceMarkEnum.OTHER;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public static void main(String[] args) {
		generateSQL();
	}

	public static void generateSQL() {

	}
}
